#ifndef LASERPARAM_H
#define LASERPARAM_H

#include <QObject>
#include <QDebug>

/**
 * @brief The LaserParam class
 * 激光参数
 */
class LaserParam
{
public:
    LaserParam(){}

    int laserMode() const
    { return mLaserMode; }
    uint power() const
    { return mPower; }
    uint frequency() const
    { return mFrequency; }
    uint halfPeriod() const
    { return mHalfPeriod; }
    uint pulseLength() const
    { return mPulseLength; }
    uint markSpeed() const
    { return mMarkSpeed; }
    uint jumpSpeed() const
    { return mJumpSpeed; }
    uint jumpDelay() const
    { return mJumpDelay; } // 注意单位说明
    uint markDelay() const
    { return mMarkDelay; }
    uint polygonDelay() const
    { return mPolygonDelay; }
    int laserOnDelay() const
    { return mLaserOnDelay; } // 单位说明
    uint laserOffDelay() const
    { return mLaserOffDelay; }

    void setLaserMode(int mode)
    { mLaserMode = mode; }
    void setPower(uint power)
    { mPower = power; }
    void setFrequency(uint frequency)
    { mFrequency = frequency; }
    void setHalfPeriod(uint halfPeriod)
    { mHalfPeriod = halfPeriod; }
    void setPulseLength(uint pulseLength)
    { mPulseLength = pulseLength; }
    void setMarkSpeed(uint markSpeed)
    { mMarkSpeed = markSpeed; }
    void setJumpSpeed(uint jumpSpeed)
    { mJumpSpeed = jumpSpeed; }
    void setJumpDelay(uint jumpDelay)
    { mJumpDelay = jumpDelay; } // 确保单位转换正确
    void setMarkDelay(uint markDelay)
    { mMarkDelay = markDelay; }
    void setPolygonDelay(uint polygonDelay)
    { mPolygonDelay = polygonDelay; }
    void setLaserOnDelay(int laserOnDelay)
    { mLaserOnDelay = laserOnDelay; } // 单位注意
    void setLaserOffDelay(uint laserOffDelay)
    { mLaserOffDelay = laserOffDelay; }
private:
    int mLaserMode = 0;     //激光器模式
    uint mPower = 0;            //功率比
    uint mFrequency = 0;        //频率Hz
    uint mHalfPeriod = 0;       //输出周期
    uint mPulseLength = 0;      //脉冲长度
    uint mMarkSpeed = 0;        //标刻速度
    uint mJumpSpeed = 0;        //跳转速度
    uint mJumpDelay = 0;        //跳转延时1bit=10us
    uint mMarkDelay = 0;        //标记延时(结束延时)
    uint mPolygonDelay = 0;     //多边形延时(转角延时)
    int mLaserOnDelay = 0;     //激光开延时 1bit=0.5us
    uint mLaserOffDelay = 0;    //激光关延时
};

#endif // LASERPARAM_H
